home *** CD-ROM | disk | FTP | other *** search
- Short: A handful of very useful scripts (1.0)
- Author: rkr@olib.org
- Uploader: Aminet.Upload.Problems@olib.org
- Type: util/rexx
-
- These six ARexx scripts have proven to be of great use, to me. They are
- primarily to be used as functions from other ARexx scripts:
- COMMAND( CMD )
- Executes a command, CMD, and return the output. The command output
- is run through a PIPE: stream. (NOTE: If the program generates no
- output, COMMAND() can get stuck.)
- say compress( command( 'list rexx:command.rexx' ), 'ex' )
- ==>
- Dirctory "r:" on Tusday 11-Apr-95
- command.r 431 ----rwd 29-Jan-95 03:51:58
- 1 fil - 2 blocks usd
-
- GETENV( VAR )
- Retrieves a given ENV: VAR for you.
- say getenv( 'user' ) ==> rkr
-
- GETFILE( FILE )
- Reads the contents of a FILE.
- say getfile( 'env:user' ) ==> rkr
-
- PUTFILE( CONTENTS, FILE )
- Stores CONTENTS into a FILE.
- say putfile( 'test', 'ram:test' ) ==> test
-
- REPLACE( SRC, OLD, NEW )
- Scans SRC and changes all OLD with NEW. The result string is
- returned.
- say replace( 'abc', 'b', 'bb' ) ==> abbc
-
- SETENV( CONTENTS, VAR, ENVARC )
- Stores CONTENTS into the ENV: var, VAR. If you pass a 1 in for
- ENVARC, it also writes the data to the ENVARC: copy of the VAR.
- say setenv( 'rkr', 'user', 1 ) ==> rkr
-
- These 6 recur enough that it seems silly to rewrite them in every script I
- write, but not so often/centrally that it's worth taking the time to create
- a proper .library for them.
-
- I'm posting them seperately as I hope to shortly release a set of archives,
- somewhat independant, but all of them hinging, to one degree or another, on
- these six scripts for occasional support. Who knows, you might even find
- your OWN uses for them. (^&
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 527 321 39.0% 12-Feb-95 22:41:08 command.rexx
- 357 265 25.7% 12-Feb-95 22:41:10 getenv.rexx
- 319 202 36.6% 12-Feb-95 22:41:10 getfile.rexx
- 258 181 29.8% 12-Feb-95 22:41:12 putfile.rexx
- 529 342 35.3% 15-Jan-95 18:06:58 replace.rexx
- 564 368 34.7% 12-Feb-95 22:41:14 setenv.rexx
- 1762 1027 41.7% 11-Apr-95 14:54:20 rkr_rexx.readme
- -------- ------- ----- --------- --------
- 4316 2706 37.3% 16-Apr-95 17:11:20 7 files
-